import request from '@/utils/request'

export function selectAllFormTemplate(params) {
  return request({
    url: window.CONFIG.workOrderRestIp + '/formTemplate/selectAll?&currentPage=' + params.currentPage + '&pageSize=' + params.pageSize,
    method: 'get'
  })
}
export function selectAllWorkOrderStatus() {
  return request({
    url: window.CONFIG.workOrderRestIp + '/workOrderStatus/selectAll',
    method: 'get'
  })
}
export function workOrderTypeCreate(params) {
  return request({
    url: window.CONFIG.workOrderRestIp + '/workOrderType/create',
    method: 'post',
    data: params
  })
}
export function workOrderTypeUpdate(params) {
  return request({
    url: window.CONFIG.workOrderRestIp + '/workOrderType/updateContent',
    method: 'post',
    data: params
  })
}
export function selectWorkTypeById(id) {
  return request({
    url: window.CONFIG.workOrderRestIp + '/workOrderType/selectContentById?id=' + id,
    method: 'get'
  })
}
export function selectAllRole(type) {
  return request({
    url: window.CONFIG.workOrderRestIp + '/role/selectAll?type=' + type,
    method: 'get'
  })
}

export function allFormTemplate() {
  return request({
    url: window.CONFIG.workOrderRestIp + '/workOrderType/selectAllFormTemplate',
    method: 'get'
  })
}

export function getTimestamp() {
  return request({
    url: window.CONFIG.workOrderRestIp + '/workOrderType/getTimestamp',
    method: 'get'
  })
}

export function selectAllType() {
  return request({
    url: window.CONFIG.workOrderRestIp + '/role/selectAllType',
    method: 'get'
  })
}
export function getWorkOrderFieldMeaning(id) {
  return request({
    url: window.CONFIG.workOrderRestIp + '/workOrderFieldReflect/getWorkOrderFieldMeaning?id=' + id,
    method: 'get'
  })
}
